package json;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class JsonDemo {

	public static void main(String[] args) throws JSONException {
		MyBean b = new MyBean();
		b.setName("name");
		JSONObject j = new JSONObject(b);
		System.out.println(j.toString());
		
		JSONObject j1 = new JSONObject("{\"name\":\"name\"}");
		System.out.println(j1.getString("name"));
	}
}
